package com.lap.auth.application.authentication.assembler;

import org.mapstruct.Mapper;
import com.lap.auth.application.authentication.dto.UserDto;
import com.lap.auth.domain.user.User;

@Mapper(componentModel = "spring")
public interface AuthAssembler {

  default UserDto toDto(User user) {
    return UserDto.builder().userId(user.getId()).username(user.getUsername())
        .fullName(user.getFullName()).deptId(user.getOrgId()).build();
  }
}
